This invention relates to server-client systems and, in particular, to a server-client system in which the server is configured to automatically detect and install peripheral devices attached to a client.
Plug and Play (PnP) technology is an architecture designed and developed by Microsoft Corporation and various independent hardware and software vendors that facilitates the integration of peripheral devices, such as printers, scanners, card readers, etc., into a personal computer system. First introduced with Windows(copyright) 95, PnP peripheral devices are configured to identify themselves to the computer system to which they are attached. A PnP compatible operating system receives identifying information and uses it to automatically locate and load a peripheral device driver that is either provided by the user or retrieved from a driver library stored at a location accessible by the computer. Loading the peripheral device driverxe2x80x94also referred to as installing the peripheral devicexe2x80x94includes defining an input/output (I/O) queue that is used to queue output to the peripheral device and/or receive input from the peripheral device. The installation is completed without requiring significant user interaction.
Before PnP technology was developed, a system user was required to install a peripheral device manually each time such a device was connected to the system. Manual installation of peripheral device drivers was a burdensome and time-consuming task for the user. It required the user to notify the operating system that the user had connected a peripheral device to the system. The user then had to locate and identify a peripheral device driver for the peripheral device, notify the system of the location of the peripheral device driver and identify an I/O port of the computer to which the peripheral device was attached so that the operating system could redirect an I/O queue for the device to the I/O port. The advent of PnP technology relieved the user from the burdens associated with manually installing peripheral device.
Although PnP technology has facilitated installation of peripheral devices by users with little or no knowledge of computer hardware or software operations, similar technology does not exist for systems in which multiple users simultaneously share the computing resources of a single machine. In such a scenario, client machines are connected to a server computer using a network. The client machines can be standalone computers or terminals. A terminal does not have the processing capability of a computer, but it does have the ability to utilize the processor in the server to execute applications and to provide a user interface for I/O operations.
A server in this environment typically has an operating system that can run several client sessions concurrently. Each client user has access to resources of the server, including the processor, data storage, application programs, etc. Software applications that are resident on the server are available to each client for independent execution by the client. Each session is independent from other clients connected to the server and, therefore, one client cannot access information relating to another client. In this manner, the server provides a logically independent machine for each client connected to the server.
Client users frequently connect peripheral devices to the client computers. For example, a client user may wish to connect a printer to the user""s client computer (a xe2x80x9clocalxe2x80x9d printer) to print data generated by an application that is running on the server computer. To do this, the user must manually install the local printer as described above and redirect the printer queue created by the server to the I/O port of the client computer to which the printer is connected. As previously stated, manual installation of peripheral devices is undesirable because it requires significant time and effort on the part of the user.
Described herein is a server-client system in which the server is configured to automatically detect and install peripheral devices attached to a client. The server is configured to detect a peripheral device connected to a client, install a driver that is compatible with the peripheral device, and redirect an I/O queue created for the peripheral device to a port of the client to which the peripheral device is connected.
Two distinct situations are considered based on whether or not the client is equipped with an operating system having a PnP subsystem. If the client is PnP compatible, the server utilizes high-level application program interfaces (APIs) to detect the peripheral devices connected to the client and determine peripheral identifiers associated with the peripheral devices. The peripheral identifiers are passed to the server, and the server installs a compatible peripheral device driver, creates an I/O queue for the peripheral device, and redirects the I/O queue to the I/O port on the client to which the peripheral device is connected.
The other situation is where the client is not PnP compatible. One case in which this arises is when the client is a terminal rather than a computer. Another case is when the client is a computer based on an older system that runs a pre-Windows(copyright) 95 operating system, such as Windows(copyright) 3.1. In these cases, the server cannot rely on the client to automatically identify local peripheral devices.
It is noted that a peripheral identifier is any designation assigned to a peripheral device by which a system can uniquely identify the peripheral device and use to recognize a compatible driver for use with the peripheral device. A peripheral identifier can be a PnP identifier, a device driver name, an arbitrarily assigned variable, or the like.
To automate peripheral device detection and installation in a server-client system in which the client is not based on PnP architecture, the client periodically polls it physical I/O ports for the existence of a connected peripheral device. This may or may not be done in response to a request from the server. If a new device is detected, information about the device, such as a peripheral identifier associated with the device, is sent to the server. The server then utilizes the information sent from the client to attempt to locate and install a peripheral device driver that is compatible with the peripheral device connected to the client. An I/O queue associated with the peripheral device is then automatically created and redirected to the I/O port to which the detected peripheral device is attached.
One way that the server can determine when a newly connected peripheral device is found is by including in its periodic request to the client a specific condition that the client return an enumeration of all peripheral devices connected to the client. The client queries the I/O ports of the client to make this determination and transmits the enumeration back to the server, where the server stores the enumeration in server memory. On a subsequent request for a similar enumeration, the server compares the enumeration received from the client in response to the subsequent request with the enumeration stored in memory. If a peripheral device is listed in the subsequent enumeration which was not listed in the initial enumeration, then the server can identify the recent addition as a peripheral device that is newly connected.
Similarly, if the initial enumeration lists a peripheral device that is not listed in the subsequent enumeration, the server will also be aware that the identified peripheral device has been removed from the system and can make accommodations for deactivating or removing that peripheral device from the system.
The same general procedure may also be initiated by the client rather than by a request from the server. In that instance, the client detects a newly connected peripheral device and forwards information relating to the connected peripheral device to the server. When the new peripheral device is identified to the server, it determines whether the device has already been announced by the client and resolves any conflicts that may arise therefrom. The server then installs a driver for the peripheral device. For clients that can detect the removal of a device, information about the device removal is forwarded to the server so that the server can make accommodations for removing or uninstalling the peripheral device from the system.
There are other ways that the server can determine when a peripheral device is connected to the system. The server can request the client to determine what I/O queues are present on the client. The client may then determine the peripheral device identifying information from these queues and relay the information to the server. Alternatively, the client may simply access system device registry information on the client which will indicate which peripheral devices are connected to the client and to what I/O port they are connected. These methods are also described in more detail below.